package com.chenfan.process.biz;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chenfan.privilege.dto.UserDTO;
import com.chenfan.process.dto.ApprovalDTO;
import com.chenfan.process.dto.ApprovalRejectedDTO;
import com.chenfan.process.entity.dto.ApprovalQueryDTO;
import com.chenfan.process.entity.dto.ApprovalTransferNodeDTO;
import com.chenfan.process.entity.po.ApprovalPo;
import com.chenfan.process.entity.vo.StartApprovalVO;
import com.chenfan.process.vo.ApprovalVo;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.UnsupportedEncodingException;

/**
 * @author K
 * @date 2021/3/4
 */
public interface ProcessBizService {

    ApprovalPo calculateNextOne(Long id, Long useId, ApprovalDTO approval) throws UnsupportedEncodingException;

    StartApprovalVO startApproval(String projectName, String approvalTemplateCode, ApprovalDTO approvalDTO);

    void sendNotify(StartApprovalVO startApprovalVO, ApprovalDTO approval);

    Long revokeApproval(Long approvalId, UserDTO userDTO);

    ApprovalPo rejectApproval(Long approvalId, ApprovalRejectedDTO rejected);

    void sendRemindMessage(Long approvalId);

    Page<ApprovalVo> pageApproval(ApprovalQueryDTO approvalQueryDTO);

    Boolean transferNode(ApprovalTransferNodeDTO dto);

    Boolean urge(Long approvalId, String bizType,  Integer voucherType, Boolean isSystem);
}
